Skip to content

Conversation

@mzottola
Copy link
Contributor

@mzottola mzottola commented May 17, 2024

Hello,

We would like to apply some timeouts during git operations i.e git clone
The libgit2 provides 2 global options for that:

  • GIT_OPT_SET_SERVER_CONNECT_TIMEOUT
  • GIT_OPT_SET_SERVER_TIMEOUT

The purpose of this PR is to add the support for those options (along with their getters)
The link to libgit2 details: https://github.com/libgit2/libgit2/blob/main/include/git2/common.h#L508C38-L524

@mzottola mzottola marked this pull request as draft May 17, 2024 08:54
@mzottola mzottola changed the title Add global opts related to server timeouts Support global opts related to server timeouts May 17, 2024
@mzottola mzottola marked this pull request as ready for review May 17, 2024 08:58
src/opts.rs Outdated
raw::GIT_OPT_GET_SERVER_CONNECT_TIMEOUT as libc::c_int,
&mut server_connect_timeout
));
println!("result = {}", server_connect_timeout);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like maybe a stray debug?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad 🤦, thanks !

@ehuss
Copy link
Contributor

ehuss commented May 21, 2024

@mzottola It looks like this has some merge conflicts, can you rebase this?
Also, in the future, it can be helpful to make sure "Allow edits from maintainers" is checked so that in situations like this I can resolve the conflicts myself.

@mzottola
Copy link
Contributor Author

@ehuss Understood for next time 👍
It's now rebased, thank you

Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ehuss ehuss added this pull request to the merge queue May 24, 2024
Merged via the queue into rust-lang:master with commit 9598e97 May 24, 2024
@mzottola mzottola deleted the feat/support-server-timeouts-master branch May 24, 2024 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants